Inner Classes: Adapters
Where You Need Them
A client creates an adapter to conform to
an external API
An inner class is local to another class or a block
It has direct access to local variables and methods
...Yet it can implement or extend any desired type
     import useful.api.Services;
     import useful.api.Callback;
     class Client {
       ...
       class Adapter implements Callback { ... }
       ...
       ... Services.process(new Adapter()) ...
     }

Return to Tracks